package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.FP;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.graphics.Spritemap;
	import net.flashpunk.masks.Pixelmask;
	/**
	 * ...
	 * @author Donatello
	 */
	public class KitchenGuy extends Entity
	{
		
		[Embed(source = "img/sheets/kitchenGuy.png")] private const PLAYER_ANIM:Class;
		[Embed(source = "img/sheets/kitchenGuyCell.png")] private const PLAYER_PIX:Class;
		private var playerAnim:Spritemap;
		
		
		
		public function KitchenGuy(px:Number=305,py:Number=500) 
		{
			playerAnim = new Spritemap(PLAYER_ANIM, 54,147);
			
			playerAnim.add("walking", [0,1,2,3], 10, true);
			
			graphic = playerAnim;
			playerAnim.flipped = true;
			
			mask = new Pixelmask(PLAYER_PIX);
			type = "KitchenGuy";
			
			x = px;
			y = py;
			
			playerAnim.play("walking");
		}
		
		
		override public function update():void
		{
			
			if (x < 0)
				FP.world.remove(this);
			
			x -= 5;
		
			
		}
	}

}